﻿using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;

public class ZonePresentEditor
{
    public void LoadFromFile(string path)
    {
        string content = File.ReadAllText(path);

        nZoneData data = JsonUtility.FromJson<nZoneData>(content);


        //for (int i = 0; i < data.foundations.Count; ++i)
        //{
        //    nUnitData ud = (nUnitData)data.foundations[i];

        //    GameObject o = GameObject.Find(ud._unit_name);

        //    if (o == null)
        //        continue;

        //    SpriteRenderer sr = o.GetComponent<SpriteRenderer>();

        //    sr.sprite = AssetDatabase.LoadAssetAtPath<Sprite>("Assets/Game/Resources/RoomImage/" + ud._res_name + ".png");
        //    sr.sortingOrder = ud._sortingOrder;
        //}


    }
}
